package com.oi.test01.hw.tiMu6;

import java.lang.reflect.Constructor;
import java.util.Scanner;

/**
 * @author bin
 * @date 2025 - 03 -17
 **/
public class MainTest {
    public static void main(String[] args) throws Exception {

        System.out.println("请输入需要判断的邮箱");
        Scanner sc = new Scanner(System.in) ;
        String eamil = sc.nextLine();

        Class<?> checkEmailClass = CheckEmail.class;

        Constructor<?> constructor =
                checkEmailClass.getConstructor(String.class);

        Object obj = constructor.newInstance(eamil);

        if(obj instanceof CheckEmail checkEmail) {
            System.out.println(checkEmail.Check());
        }

    }
}
